#pragma once
#include "../base/basic_types.h"


struct KTouchEvent
{
	enum TouchType {eTouchDown, eTouchMove, eTouchUp, eTouchClick};

	TouchType type;
	KVec2 pos;
};


class KTouchEventRingBuffer
{
private:
	static const int cRingBufLen = 20;
	KTouchEvent mRingBuf[cRingBufLen];
	int mStartIdx;
	int mEventCnt;

public:
	KTouchEventRingBuffer();
	
	void PushEvent(KTouchEvent::TouchType type, const KVec2& pos);
	int GetEventCount() const;
	const KTouchEvent& GetEvent(int idx) const;
	void Reset();
};